import request from '@/utils/request'

//列表
export function listCardRule(query) {
  return request({
    url: '/system/value/card/rule/list',
    method: 'get',
    params: query
  })
}
//详情
export function getCardRule(id) {
  return request({
    url: '/system/value/card/rule/' + id,
    method: 'get'
  })
}

//新增
export function addCardRule(data) {
  return request({
    url: '/system/value/card/rule',
    method: 'post',
    data: data
  })
}

//修改
export function updateCardRule(data) {
  return request({
    url: '/system/value/card/rule',
    method: 'put',
    data: data
  })
}
//删除
export function delCardRule(id) {
  return request({
    url: '/system/value/card/rule/' + id,
    method: 'delete'
  })
}

export function listMemberRegion(query) {
  return request({
    url: '/system/region/addList',
    method: 'get',
    params: query
  })
}
export function listMemberStore(query) {
  return request({
    url: '/system/store/pullDown',
    method: 'get',
    params: query
  })
}
//跨店规则
export function submitCross(data) {
  return request({
    url: 'system/valuecardCrossrule/editAdd',
    method: 'post',
    data: data
  })
}


// 优惠券
export function cardRuleCouponList(query) {
  return request({
    url: '/system/coupon/cardRuleCouponList',
    method: 'get',
    params: query
  })
}

// 优惠券1
export function getZyCouponEffectiveList(query) {
  return request({
    url: '/system/coupon/getZyCouponEffectiveList',
    method: 'get',
    params: query
  })
}